import os
from core.prompt_generator import PromptGenerator
from core.prompt_discriminator import PromptDiscriminator
from core.workflow_controller import WorkflowController

def main():
    # 用户需求输入
    user_input = input("请输入您的需求描述：")
    max_iterations = 5

    # 初始化模块
    generator = PromptGenerator()
    discriminator = PromptDiscriminator()
    controller = WorkflowController(generator, discriminator, max_iterations)

    # 执行工作流程
    final_prompt = controller.run(user_input)

    # 输出最终优化的提示词
    print("最终优化的提示词：")
    print(final_prompt)

if __name__ == "__main__":
    main()